/**
 * @author rxliuli
 */
const app = new Vue({
    el: '#app',
    data: {
        baseHouseOfficer: new BaseHouseOfficer(),
    },
    methods: {
        async update() {
            this.$validator.validateAll().then(async (res) => {
                if (res) {
                    if (await ajaxOption({
                        res: baseHouseOfficerApi.update(this.baseHouseOfficer),
                        danger: '修改负责人信息失败',
                        success: '修改负责人信息成功',
                    })) {
                        await rx.wait(1000)
                        forward('/basic-data/admin_officer')
                    }
                } else {
                    rxPrompt.dangerMsg("输入存在错误！");
                }
            })
        },
        reset() {
            this.baseIpAddressInfo = new BaseHouseOfficer({
                idType: 2,
            })
        },
    },
    computed: {},
    async mounted() {
        this.baseHouseOfficer = forward.getData();
    },
})